package ebj.common.java8.collection;

import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class TestClass extends BaseClass {
    public static void main(String[] args) throws IOException {
         List<String> list = Arrays.asList(getDemoArray());
         list.stream().forEach(System.out::println);
         list.stream().forEach(x -> System.out.println("Name: " + x));
         getListFromFile().stream().filter(x -> x.length() > 12 ).forEach(System.out::println);
         
         Set<Integer> set1 = new HashSet<Integer>(){{
             add(1);
             add(3);
             add(5);
         }};

         Set<Integer> set2 = new HashSet<Integer>(){{
             add(1);
             add(2);
             add(3);
         }};
         
         System.out.println(set1.containsAll(set1));
    }
}
